import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './config/axios'
import qsp from 'qs'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import MyData from './config/global'
import './assets/global.css'

// 引入echarts
import * as echarts from 'echarts/dist/echarts'
Vue.prototype.$echarts = echarts

Vue.use(ElementUI)
Vue.use(qsp)
Vue.prototype.MyData = MyData
Vue.config.productionTip = false

router.beforeEach((to, from, next) => {
  /* 路由发生变化修改页面title */
  if (to.meta.title) {
    document.title = to.meta.title
  }
  next()
})

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
